home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / tpsbk100.zip / SBDEMO.PAS < prev    next >
Pascal/Delphi Source File  |  1991-07-23  |  4KB  |  103 lines

  1. Program SBDemo;
  2. Uses
  3.   CRT, SBDrive, SBBKBAS, SBOPiano, SBNPiano, SBOMulti;
  4. Const
  5.   TempInst : Array [0..9] Of InstType = (
  6.     ($21,$11,$4C,$00,$F1,$F2,$63,$72,         { Instrument 0 }
  7.     $00,$00,$04,$00,$00,$00,$00,$00),
  8.     ($A5,$B1,$D2,$80,$81,$F1,$03,$05,         { Instrument 1 }
  9.     $00,$00,$02,$00,$00,$00,$00,$00),
  10.     ($72,$62,$1C,$05,$51,$52,$03,$13,         { Instrument 2 }
  11.     $00,$00,$0E,$00,$00,$00,$00,$00),
  12.     ($11,$01,$8A,$40,$F1,$F1,$11,$B3,         { Instrument 3 }
  13.     $00,$00,$06,$00,$00,$00,$00,$00),
  14.     ($21,$11,$11,$00,$A3,$C4,$43,$22,         { Instrument 4 }
  15.     $02,$00,$0D,$00,$00,$00,$00,$00),
  16.     ($31,$A1,$1C,$80,$41,$92,$0B,$3B,         { Instrument 5 }
  17.     $00,$00,$0E,$00,$00,$00,$00,$00),
  18.     ($71,$62,$C5,$05,$6E,$8B,$17,$0E,         { Instrument 6 }
  19.     $00,$00,$02,$00,$00,$00,$00,$00),
  20.     ($41,$91,$83,$00,$65,$32,$05,$74,         { Instrument 7 }
  21.     $00,$00,$0A,$00,$00,$00,$00,$00),
  22.     ($32,$16,$87,$80,$A1,$7D,$10,$33,         { Instrument 8 }
  23.     $00,$00,$08,$00,$00,$00,$00,$00),
  24.     ($01,$13,$8D,$00,$51,$52,$53,$7C,         { Instrument 9 }
  25.     $01,$00,$0C,$00,$00,$00,$00,$00));
  26. Var X : Word;
  27.     Ch : Char;
  28.     B : Boolean;
  29.  
  30. Begin
  31.   WriteLn('Turbo Pascal SoundBlaster Toolkit Demo');
  32.   WriteLn('Driver version TP',Hi(SBDVersion),'.',Lo(SBDVersion));
  33.   WriteLn;
  34.   WriteLn('Loading instrument cello...');
  35.   LoadInstrument(1,TempInst[9]);
  36.   WriteLn(' Playing Solfeggietto by Carl Phillipp Emanuel Bach');
  37.   B := BasicBackInit;
  38.   BasicPlay('MB');
  39.   If Not PlayBasicFile('Solfe.Muz') Then
  40.     WriteLn('  Unable to open Solfe.Muz.');
  41.   WriteLn;
  42.   X := 0;
  43.   While BasicPlayingInBack And Not KeyPressed Do Begin
  44.     Inc(X);
  45.     Write('Look, Ma!  It''s playing in the background!  ',X,#13);
  46.   End;
  47.   WriteLn;
  48.   While KeyPressed Do Ch := ReadKey;
  49.   BasicPlayingMode(StopSong);
  50.   BasicShutdownBack;
  51.   WriteLn;
  52.   WriteLn('Loading instrument piano...');
  53.   LoadInstrument(1,TempInst[0]);
  54.   WriteLn(' Playing C Minor');
  55.   If Not PlayOldPiano('CMinor.Mus') Then
  56.     WriteLn('  Unable to open CMinor.Mus.');
  57.   WriteLn;
  58.   WriteLn('Loading instrument harp...');
  59.   LoadInstrument(1,TempInst[4]);
  60.   WriteLn(' Playing Dixie by Daniel Decatur Emmett');
  61.   WriteLn;
  62.   WriteLn(' Oh I wish I was in the land of cot-ton,');
  63.   WriteLn(' Old times there are not for-got-ten,');
  64.   WriteLn(' Look a-way! Look a-way! Look a-way! Dixie Land.');
  65.   WriteLn(' Oh I wish I was in the land of cot-ton,');
  66.   WriteLn(' Old times there are not for-got-ten,');
  67.   WriteLn(' Look a-way! Look a-way! Look a-way! Dixie Land.');
  68.   WriteLn(' I wish I was in Dixie, Hoo-ray!  Hoo-ray!');
  69.   WriteLn(' In Dixie Land I''ll take my stand,');
  70.   WriteLn(' To live and die in Dixie,');
  71.   WriteLn(' A-way, a-way, a-way down south in Dixie,');
  72.   WriteLn(' A-way, a-way, a-way down south in Dixie.');
  73.   If Not PlayNewPiano('Dixie.Muz') Then
  74.     WriteLn(#13,#10,'  Unable to open Dixie.Muz.');
  75.   WriteLn;
  76.   WriteLn('Loading instrument accordian...');
  77.   LoadInstrument(1,TempInst[7]);
  78.   OldAddFile('ENTRTAN1.MUS');
  79.   LoadInstrument(2,TempInst[7]);
  80.   OldAddFile('ENTRTAN2.MUS');
  81.   LoadInstrument(3,TempInst[7]);
  82.   OldAddFile('ENTRTAN3.MUS');
  83.   LoadInstrument(4,TempInst[7]);
  84.   OldAddFile('ENTRTAN4.MUS');
  85.   WriteLn(' Playing The Entertainer by Scott Joplin');
  86.   If Not PlayOldMulti Then
  87.     WriteLn('  Unable to open Entertainer files.');
  88.   WriteLn;
  89.   LoadInstrument(1,TempInst[1]);
  90.   OldAddFile('C:\SB\PAKLBEL1.MUS');
  91.   LoadInstrument(2,TempInst[1]);
  92.   OldAddFile('C:\SB\PAKLBEL2.MUS');
  93.   LoadInstrument(3,TempInst[1]);
  94.   OldAddFile('C:\SB\PAKLBEL3.MUS');
  95.   LoadInstrument(4,TempInst[1]);
  96.   OldAddFile('C:\SB\PAKLBEL4.MUS');
  97.   WriteLn(' Playing PAKLBEL');
  98.   If Not PlayOldMulti Then
  99.     WriteLn('  Unable to open PAKLBEL files.');
  100.   WriteLn;
  101. End.
  102.  
  103.